import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

// 引入路由组件
// 初始首页
const Home = resolve => require(['../views/home'], resolve)
const Statistics = resolve => require(['../views/statistics'], resolve)
const chen = resolve => require(['../views/chen'], resolve)
// ***************************************************************************

const routes = [
  // 首页
  {
    path: '/',
    name: 'home',
    component: Home
  }, {
    path: '/statistics',
    component: Statistics
  },
  {
    path:'/report',
    name:'report',
    component: () => import('@/views/report/index.vue')
  },
  // yanghan
  {
    path: '/yanghan',
    name: 'yanghan',
    component: resolve => require(['../views/yanghan'], resolve)
  },
  // chen
  {
    path: '/chen',
    component: chen
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
